﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>系统日志-微街秀管理后台</title>
    <link rel="stylesheet" type="text/css" href="../css/css.css" />
<style>
    table{border-collapse: collapse;border: none;width:100%; text-align:center;}
    td{border: solid #ccc 1px;color:Black; height:26px; font-size:12px;}
    .td1,.td2,.td3,.td6{width:100px; font-weight:bold; text-align:center;}
    .left{ text-align:left;}
</style>
    <script src="../js/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="../js/base.js" type="text/javascript"></script>
    <script src="../js/ajax-data.js" type="text/javascript"></script>
    <script src="../js/Pager.js" type="text/javascript"></script>
    <script src="../js/dialog.js" type="text/javascript"></script>
</head>
<body>
<div style="width:860px; margin-left:auto; margin-right:auto;">
<div style="margin:10px 0 10px 0"> 微街秀ID:<input type="text" id="userid" name="userid" style="width:80px;" />
    管理员ID:<input type="text" id="adminid" name="adminid" style="width:80px;"/>  
    <input type="button" id="btn" value="搜 索" onclick="submits()" /></div>

  <table>
    <tr>
        <td style="width:145px;">操作日期</td>
        <td style='width:60px;'>管理员</td>
        <td>描述</td>
        <td style='width:60px;'>微街秀ID</td>
    </tr>
      <tbody id="list"></tbody>
  </table>
 <div class="pager_style">
    <ul class="page_num"></ul>
    <ul class="page_info">
        <li>总数:<span id="count">0</span></li>
        <li>每页:<span id="pageSize">0</span></li>
        <li>页数:<span id="pageToal">0</span></li>
    </ul>
</div>
<input type="hidden" id="pagecount" value="0" />
</div>
 <script>
     $(function () {
         GetList(1);
     })

     function GetList(page) {
         var userid = $("#userid").val();
         var adminid = $("#adminid").val();
         var param = "page=" + page;

         if (userid != "")
             param += "&userid=" + userid;

         if (adminid != "")
             param += "&adminid=" + adminid;
         $("#list").html("");
         var html = "";
         AjaxStart("../ajax/log.ashx?getlist", param, function (data) {
             if (data.code != 0) {
                 $("#list").html(html + "<tr><td colspan='8'>" + data.msg + "</td></tr>");
             }
             else {
                 $("#list").html("");
                 var list = data.item.table;
                 for (var i = 0; i < list.length; i++) {
                     html += "<tr>";
                     html += "<td>" + list[i].date.replace("T", " ").substring(0,19) + "</td>";
                     html += "<td>" + list[i].name + "</td>";
                     html += "<td class='left'>" + list[i].msg + "</td>";
                     html += "<td>" + list[i].user_id + "</td>";
                     html += "</tr>";
                 }

                 $("#list").html(html);
                 var pager = new Pager();
                 $(".page_info").css("display", "block")
                 pager.initPage(page, data.item.itemCount, 20, 5, GetList);
             }
         });
     }

     function submits() {
         GetList(1);
     }
 </script>
</body>
</html>
